<?

if ($c = stack('name')) {

	$_id_component	= $DATA['components'][$c]['id'];			//	list id value
	$_id_data		= D_MB_DATA;			//	meta id value
	$_id_meta		= D_MB_META;			//	meta id value
	
	$_crit = "id_data=$_id_data AND id_parent=$_id_component";


	$s = array_extend( array('api_key' => '', 'map_center' => '', 'map_scale' => '', 
		'point_url' => '', 'point_size' => '', 'point_offset' => '',
		'shadow_url' => '', 'shadow_size' => '', 'shadow_offset' => '',
		'balloon_tpl' => '<div class="mapa-balloon"><img src="/img/logo-map.png" class="mapa-balloon-img" alt="Company name" /><p><strong>$[kk.name]</strong>, $[kk.address]</p><p>Режим работы: $[kk.hours|не задан]</p><p>$[kk.place]</p></div>'
	), $DATA['components'][$c]['settings']);

	$DATA['components'][$c]['data'] = array_mark_bounds( datafetch_array('db_list', array('table' => tb('data'), 'where' => "$_crit",	'order' => 'id_index', 'index' => 'id' )));

	foreach($DATA['components'][$c]['data'] as $k => $v) {
		$DATA['components'][$c]['data'][$k] = $temp = array_merge($v, datafetch_array('meta', $_id_meta, $k, $CONTEXT['lang']));
		$temp = explode("\n", $temp['point']);
		foreach ($temp as $v)
			if ($v = trim($v)) {
				$t = explode(':', $v, 2);
				if ($t[0] = trim($t[0]))
					$DATA['components'][$c]['data'][$k]['data'][$t[0]] = trim($t[1]);
			}
	}

	unstack();
}

?>